package recursion;

public class Demo2 {
    public static void main(String[] args) {
        System.out.println(print(1));
        System.out.println(print(2));
        System.out.println(print(3));
        System.out.println(print(4));
        System.out.println(print(5));
        System.out.println(print(6));
        System.out.println(print(7));
        System.out.println(print(8));
        System.out.println(print(9));
        System.out.println(print(10));
    }

    private static int print(int i) {
        if (i == 10)
            return 1;
        return print(i + 1) * 2 + 2;

    }
}
